home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 3032.ZIP / RLIB20.ZIP / RL_FILED.PRG < prev    next >
Text File  |  1989-02-18  |  563b  |  24 lines

  1. * Function: FILEDATE
  2. * Author..: Richard Low
  3. * Syntax..: FILEDATE( <expC> )
  4. * Returns.: Date of <filename> from directory entry.
  5.  
  6. FUNCTION FILEDATE
  7. PARAMETER p_fname
  8.  
  9. *-- make sure a parameter was passed
  10. IF PCOUNT() = 1
  11.  
  12.    *-- set up array to hold the file date from ADIR()
  13.    DECLARE f_fdate[1]
  14.  
  15.    *-- call ADIR to check filespec given and fill date array
  16.    IF ADIR( p_fname, '', '', f_fdate ) = 1
  17.       *-- return date if all is well
  18.       RETURN f_fdate[1]
  19.    ENDIF
  20.  
  21. ENDIF
  22. *-- otherwise, return an empty date
  23. RETURN CTOD('  /  /  ')
  24.